There are two common ways to set up a React Native development environment: [`expo-cli`](https://docs.expo.io/versions/latest/workflow/expo-cli/) and `react-native-cli`.

# `expo-cli` (formerly `create-react-native-app`)

This is a command-line utility for configuring and publishing React Native projects. _This is the best way to get started as a beginner_. This tool generates a QR code which you can scan to launch the app on your device. As you update your code, the changes will automatically be reflected on your device. In order to preview the app on your device, you'll be prompted to download the `Expo` app, which is a React Native app previewing client.

The downside to this approach is that it only works for pure-JavaScript apps. If at any point you need to use custom native modules (Obj-C/Swift, Java/Kotlin, etc), you'll need to `eject`. The `expo-cli` command line utility provides an `eject` command to export your app into the same format used by `react-native init`, which you can then add native modules to.
We'll walk through this in the next section, [Quick Start](/quick_start).

The company behind `expo-cli`, [Expo](https://expo.io/), has been heavily involved in the React Native codebase and community since it's inception, so you can be confident that the tool is well-maintained and doesn't deviate too much from a "standard" React Native setup.

# `react-native-cli`

If you know you'll need custom native modules in your app, you'll want to use the `react-native-cli` to create your app. You can read how to do this on the Facebook docs for [Getting Started](https://facebook.github.io/react-native/docs/getting-started.html). Click on the "React Native CLI Quickstart" tab.

In terms of the JavaScript code, the main difference from `expo-cli` is that `react-native-cli` requires registering the root component of your app using `AppRegistry.registerComponent`, e.g:

```
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';

AppRegistry.registerComponent(appName, () => App);
```

This allows you to optionally have multiple React Native root components, which you might embed into different native screens. `expo-cli` uses the default export of `App.js` as your root component.

## Up Next

The following section will guide you through setting up a React Native app with `expo-cli`.
